<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
<link href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
	<script src="//cdn.bootcss.com/jquery/2.1.4/jquery.min.js"></script>
	<style type="text/css">
		ul{display: flex}
		ul li{flex:1; background: #ccc; list-style: none;text-align: center;}
		.tclass{ background: #990000}
	</style>
	<script type="text/javascript">
		$(document).ready(function(){

			$('#nav').click(function(e) {
			  	// 要知道siblings的使用
				$(e.target).addClass('tclass').siblings('.tclass').removeClass('tclass');;
			});
		});
	</script>
</head>
<body>
	<div>导航菜单背景切换效果</div>
	<ul id='nav'>
	    <li>导航一</li>
	    <li>导航二</li>
	    <li>导航三</li>
	</ul>
</body>
</html>